<?php
$this->widget(
	'library\widgets\BreadCrumbs', 
	array('index', 'options')
);
?>

<?php $this->widget('library\widgets\Tips'); ?>

<div class="taber">
<div class="head" id="menu_tab">
	<a href="#" lang="t1" class="<?php if ($this->category == 1) : ?>selected<?php endif; ?>">基本信息</a>
	<a href="#" lang="t2" class="<?php if ($this->category == 2) : ?>selected<?php endif; ?>">注册</a>
	<a href="#" lang="t3" class="<?php if ($this->category == 3) : ?>selected<?php endif; ?>">图片管理</a>
	<a href="#" lang="t4" class="<?php if ($this->category == 4) : ?>selected<?php endif; ?>">邮件设置</a>
	<a href="#" lang="t5" class="<?php if ($this->category == 5) : ?>selected<?php endif; ?>">分页配置</a>
</div>
<div class="body" id="t1" style="display: <?php if ($this->category == 1) : ?>block<?php else : ?>none<?php endif; ?>;">
<?php
echo $this->getHtml()->openForm($this->util->getUrlByAct(array('category' => 1)), 'post');
$_form = require_once 'show_options_1.php';
$this->widget('library\widgets\FormBuilder', $_form);
echo $this->getHtml()->closeForm();
?>
</div>
<div class="body" id="t2" style="display: <?php if ($this->category == 2) : ?>block<?php else : ?>none<?php endif; ?>;">
<?php
echo $this->getHtml()->openForm($this->util->getUrlByAct(array('category' => 2)), 'post');
$_form = require_once 'show_options_2.php';
$this->widget('library\widgets\FormBuilder', $_form);
echo $this->getHtml()->closeForm();
?>
</div>
<div class="body" id="t3" style="display: <?php if ($this->category == 3) : ?>block<?php else : ?>none<?php endif; ?>;">
<?php
echo $this->getHtml()->openForm($this->util->getUrlByAct(array('category' => 3)), 'post');
$_form = require_once 'show_options_3.php';
$this->widget('library\widgets\FormBuilder', $_form);
echo $this->getHtml()->closeForm();
?>
</div>
<div class="body" id="t4" style="display: <?php if ($this->category == 4) : ?>block<?php else : ?>none<?php endif; ?>;">
<?php
echo $this->getHtml()->openForm($this->util->getUrlByAct(array('category' => 4)), 'post');
$_form = require_once 'show_options_4.php';
$this->widget('library\widgets\FormBuilder', $_form);
echo $this->getHtml()->closeForm();
?>
</div>
<div class="body" id="t5" style="display: <?php if ($this->category == 5) : ?>block<?php else : ?>none<?php endif; ?>;">
<?php
echo $this->getHtml()->openForm($this->util->getUrlByAct(array('category' => 5)), 'post');
$_form = require_once 'show_options_5.php';
$this->widget('library\widgets\FormBuilder', $_form);
echo $this->getHtml()->closeForm();
?>
</div>
</div>

<script type="text/javascript">
var oMenuTabs = idea.id("menu_tab").getElementsByTagName("a");
for (var i in oMenuTabs) {
	if (!idea.isInt(i)) {
		continue;
	}

	oMenuTabs[i].onclick = function() {
		chgTab(this);
	}
}

function chgTab(oCurrTab) {
	for (var i in oMenuTabs) {
		if (!idea.isInt(i)) {
			continue;
		}

		oMenuTabs[i].className = "";
		idea.id(oMenuTabs[i].lang).style.display = "none";
	}

	idea.id(oCurrTab.lang).style.display = "block";
	oCurrTab.className = "selected";
}
</script>
